#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <Rectangle.h>

USING_MOCKCPP_NS USING_TESTNGPP_NS

FIXTURE(Rectangle)
{
	TEST(should be able to calc perimeter: width=3, height=5, Perimeter=16)
	{
		Rectangle rectangle(3,5);
		ASSERT_EQ(16, rectangle.getPerimeter());
	}

	TEST(should be able to calc area: width=3, height=5, area=15)
	{
		Rectangle rectangle(3,5);
		ASSERT_EQ(15, rectangle.getArea());
	}

	TEST(should be able to set width: width=4, height=5, area=20)
	{
		Rectangle rectangle(3,5);
		rectangle.setWidth(4);
		ASSERT_EQ(20, rectangle.getArea());
	}

	TEST(should be able to set width: width=3, height=6, perimeter=18)
	{
		Rectangle rectangle(3,5);
		rectangle.setHeight(6);
		ASSERT_EQ(18, rectangle.getPerimeter());
	}

};
